<?php
/**
 * User: MT
 * Date: 2018/5/24 0024
 */
namespace app\model;
use core\lib\model;

class UserModel extends model{
    public $table = 'user';
    //增
    public function add($data){
        return $this->insert($this->table,$data);
    }
    //删
    public function delete($id){
        $this->delete($this->table,['id'=>$id]);
    }
    //改
    public function upd($data,$id){
        //return $this->update($this->table,$data,['id'=>$id]);
        return $this->update($this->table,$data,['id'=>$id]);
    }
    //查
    public function select(){
        return $this->select($this->table,'*');
    }
}